package com.adastros.buildingmanager.model;

import java.math.BigDecimal;
import java.util.List;

/**
 * Representa un elemento construido en el edificio, ya sea un departamento, deposito o estacionamiento.
 * @author developer
 */
public class BuildingSection {

  public enum Kind {
    DEPARTMENT("Departamento"), PARKING("Estacionamiento"), STORAGE("Depósito") ;
    
    private final String name ;
    
    private Kind(String name) {
      this.name = name ;
    }

    @Override
    public String toString() {
      return name ;
    }    
  } 
  
  private int id ;
  private String name ;
  private Address address ;
  private Kind kind ;
  private BuildingSectionState currentState ;
  private List<BuildingSectionState> oldStates ;
  
  public BuildingSection() {
  }
  
  public BigDecimal getShare() {
    return currentState.getShare();
  }

  public void setShare(BigDecimal share) {
    this.currentState.setShare(share);
  }  
  
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Address getAddress() {
    return address;
  }

  public void setAddress(Address address) {
    this.address = address;
  }  

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }  
}